﻿@using ForzaGT3.Data
@model IEnumerable<Driver>
@{
    ViewBag.Title = "Index";
}
@if (Model != null)
{
    int standing = 1;
    foreach (Driver data in Model)
    {
        string specdetailIdCall = "#specdetails" + standing.ToString();
        string specdetailId = "specdetails" + standing.ToString();
        
    <div class="redbg header shadow">
        @data.Number | @data.Name</div>     
    <div class="profile">
        <a href="@specdetailIdCall" class="specs">
            <img src="@Links.Assets.images.btn_specs_png" alt="specs" /></a>
        <div style="display: none;">
            <div id="@specdetailId" class="specsdetails">
                <h3>
                    @data.CarName</h3>
                <div class="text">
                    @MvcHtmlString.Create(data.Remarks)
                </div>
            </div>
        </div>
        <img src="@Url.Content("~" + data.ProfilePictureUrl)" alt="profile" width="99px" />
        <div class="text">
            <img src="@Url.Content("~" + data.Country.FlagUrl)" alt="@data.Country.Name" />Indonesia
            <table width="100%" cellpadding="0" cellspacing="0" border="0">
                <tr>
                    <td class="odd">
                        Team
                    </td>
                    <td>
                        @data.Team.Name
                    </td>
                </tr>
                <tr>
                    <td class="odd">
                        Standing
                    </td>
                    <td>
                        @standing
                    </td>
                </tr>
                <tr>
                    <td class="odd">
                        Points
                    </td>
                    <td>
                        @data.Points
                    </td>
                </tr>
                <tr>
                    <td class="odd">
                        Car
                    </td>
                    <td>
                        @data.CarName
                    </td>
                </tr>
            </table>
        </div>
        <img src="@Url.Content("~" + data.CarPhotoUrl)" alt="@data.CarName" align="left" style="margin-top: 35px;" />
    </div> 
        
        standing += 1;
    }


}
